<template>
  <div>
    <!-- <h2>query接收参数</h2>
    <p>{{ $route.query }}</p>
    <p>{{ $route.query.name }}</p>
    <p>{{ $route.query.age }}</p> -->

    <h2>params接收参数</h2>
    
    <p>{{ $route.params.name }}</p>
    <p>{{ $route.params.age }}</p>
    <img src="../assets/images/friend.png" alt="">
  </div>
  
</template>

<script>
export default {
  mounted() {
    console.log( this.$route.params );
  },
}
</script>

<style>

</style>